home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
internet
/
irc_i_dodatki
/
mcf4amirc
/
rexx
/
ctcp_sound.amirx
next >
Wrap
Text File
|
1996-12-22
|
3KB
|
11 lines
/* CTCP_Sound.AMIRX
// $VER: CTCP_Sound.AMIRX 4.11 (22.12.96) (MCF Extra Command)
\\ Written by Donald T. Becker (dtbecker@prolog.net) IRC: StarDustr
// Please mail any bug reports/comments to the above address with a subject
\\ header of MCF.AMIRX.
//
\\ ** What to do with this file?
// Put this script in REXX:
\\ Add the following Alias S /Rx MCF_Sound %p
*/
;parse arg file who junk;if file="" then exit;if who="" then;do;options results;getchannel;who=result;end;MCFenv=address();xl=pos('.',MCFenv)+1;Client=substr(MCFenv,xl,1);SDC="SOUNDDIR."||Client;SD=getclip(SDC);SPC="SOUNDPLAYER."||Client;SoundPlayer=getclip(SPC);rpch=right(SD,1);if rpch ~="/"&rpch ~=":" then SD=SD||"/";if file ~='?' then;do;sfile=file;file=SD||sfile;signal SendSound;end;if ~show('L',"rexxreqtools.library") then;if ~addlib("rexxreqtools.library",0,-30,0) then exit 10;xl=length(SD);if ":"=substr(SD,xl) then;do;SDa=upper(left(SD,xl-1));if showlist("A",SDa) then call FindDir();if ":"=right(SD,1) then;xl=length(SD);else xl=length(SD)+1;end;file=rtfilerequest(SD);if file="" then exit;sfile=substr(file,xl+1);SendSound:;"echo P="d2c(27)"««MCF» Sending SOUND "d2c(2)||sfile|| d2c(2)" to "d2c(2)||who;"RAW PRIVMSG "who" :"d2c(1)"SOUND "sfile" ("sfile")"|| d2c(1);if ""=statef(file) then exit;PSC="PSOUND."||Client;if "Y"=getclip(PSC) then address command SoundPlayer file;exit;FindDir:;call GetDirs();if ~exists("T:MCF.SoundDir") then return;call open("Input","T:MCF.SoundDir","R");xx=readln("Input");SDirs="";do scnt=1 by 1 until eof("Input");xy="Send from this Dir?"||'0a'x||xx;SD=rtezrequest(xy,"_Yes|_No");if SD=1 then;do;SD=xx;leave;end;xx=readln("Input");end scnt;call close("Input");address command "Delete >nil: T:MCF.SoundDir";if SD="0" then exit;return;GetDirs:;address command "Assign >T:MCF.SDir Dirs";call open("Input","T:MCF.SDir","R");xx=upper(readln("Input"));acntr=0;do cnt=1 by 1 until eof("Input");parse value xx with yy zz junk;if yy=SDa then;do;do acntr=1 by 1 until yy ~="+";sd.acntr=zz;xx=upper(readln("Input"));parse value xx with yy zz junk;end acntr;call close("Input");if acntr=1 then;do;address command "Delete >nil: T:MCF.SDir";return;end;if ~open('console',"con:0/20/320/180/MCF Sound Directory Screen/CLOSE",'W') then;exit;len=writeln('console'," ");len=writeln('console'," ");len=writeln('console'," Select Directory you wish to send a Sound from.");len=writeln('console'," ");len=writeln('console'," ");do bcntr=1 by 1 until bcntr=acntr;Oline=" " bcntr||": " sd.bcntr;len=writeln('console',Oline);end bcntr;len=writeln('console'," ");ans=readln('console');call close('console');if ans<1|ans>bcntr then exit;SD=sd.ans;leave;end;xx=upper(readln("Input"));end;call close("Input");address command "Delete >nil: T:MCF.SDir";return